<?php

namespace App\Models;

use EasyWeChat\Factory;

class Wechat extends Base
{
    protected function wechatSend($touser, $template_id, $url, $data){
        $config = config("wechat.official_account.default");
        $app = Factory::officialAccount($config);
        $ret = $app->template_message->send([
            'touser' => $touser,
            'template_id' => $template_id,
            'url' => $url,
            'data' => $data,
        ]);
        return $ret;
    }
}
